<template>
	<view class="classLayout pageBg">
		<custom-nav-bar  title="分类"></custom-nav-bar>
		<view class="classify">
			<theme-item v-for="item in classifyList" :key="item._id" :item="item"></theme-item>
		</view>
	</view>
</template>

<script setup>
	import { ref } from "vue"
	import { apiGetClassify } from "@/api/apis.js"
	import { onShareAppMessage,onShareTimeline } from '@dcloudio/uni-app'
	const classifyList = ref([])
	const getClassify = async() => {
		let res = await apiGetClassify(
		{pageSize:15}
		)
		classifyList.value = res.data
		
	}
	getClassify()
	// 分享给好友  aip->第三方服务->分享
	onShareAppMessage(()=>{
		return {
			title:"咸虾米壁纸,精选分类",
			path:"/pages/index/index"
		} 
	})
	// 分享到 微信朋友圈 微信小程序开发平台去看相关api
	onShareTimeline(()=>{
		return {
			title:"咸虾米壁纸,精选分类",  //分享给别人的title
			imageUrl: "/static/images/xxmLogo.png",  
		}
	})
</script>

<style lang="scss" scoped>
    .classify{
		padding: 30rpx;
		display: grid;
		grid-template-columns: repeat(3,1fr);
		gap:15rpx;
	}	       
</style>
